<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>场馆类型</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="admin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../script/jquery-1.4.4.min.js"></script>
    <script src="../script/my_lightbox.js" language="javascript"></script>
</head>
<body>
	<div class="container">
        <div class="flow">
            <div class="itemtitle">
                <h3>场馆类型</h3>
                <ul>
                    <li <{if $smarty.get.operation==''}>class="current"<{/if}>><a href="?m=<{$smarty.get.m}>&s=<{$smarty.get.s}>"><span>管理</span></a></li>
                   	<li <{if $smarty.get.operation=='add'}>class="current"<{/if}>><a href="?m=<{$smarty.get.m}>&s=<{$smarty.get.s}>&operation=add"><span>添加</span></a></li>
                    <{if $smarty.get.operation=='edit'}>
                    <li class="current"><a href="#"><span>修改</span></a></li>
                    <{/if}>
                </ul>
            </div>
        </div>
        <div class="h35"></div>
        <form action="" method="post">
        <{if $smarty.get.operation=='add' or $smarty.get.operation=='edit' }>
            <form name="form" id="form" method="post">
            <input name="id" type="hidden" id="id" value="<{$re.id}>">
            <table class="table">
                <thead>
                    <tr>
                        <th class="partition" colspan="99">场馆类型</th>
                    </tr>
                </thead>
                <tbody>
                <tr>
                    <td>分类名称</td>
                    <td>
                    <input name="cat_name" type="text" id="cat_name" class="w350" value="<{$re.cat_name}>"/>
                    </td>
                </tr>

                <tr>
                    <td>是否显示</td>
                    <td>
                    <input type="checkbox" value="1" id="statu" name="statu"  <{if $re.statu }> checked="checked" <{/if}> >是
                    </td>
                </tr>

                <tr>
                    <td>&nbsp;</td>
                    <td>
                    <input class="submit" type="submit" value="提交">
                    <input name="act" type="hidden" id="action" value="<{if !$smarty.get.editid}>save<{else}>edit<{/if}>">
                   
                    </td>
                </tr>
                </tbody>
            </table>
            </form>
        <{else}>
        <table class="table">
        	
            <tbody>
                <tr class="header partition">
                    <th width="70">显示顺序</th>
                    <th>类型名称</th>
                    <th>显示</th>
                    <th width="70"></th>
                </tr>
            </tbody>  
              
            <{foreach item=list key=key from=$de}>
            <tbody>
                <tr>

                    <td><input type="text" class="w50" maxlength="3" name="displayorder[<{$list.id}>]" value="<{$list.id}>" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" onkeyup="value=value.replace(/[^\d]/g,'')" /></td>
                    <td>
                        <input type="text" class="w150" name="name[<{$list.catid}>]" value="<{$list.cat_name}>" />
                    </td>
                    <td><{if $list.statu==1}>显示<{else}>不显示<{/if}></td>
                    <td>
					<a href="?m=<{$smarty.get.m}>&s=<{$smarty.get.s}>&operation=edit&editid=<{$list.id}>"><{$editimg}></a>
                    <a onclick="return confirm('确定删除吗');" href="?m=<{$smarty.get.m}>&s=<{$smarty.get.s}>&delid=<{$list.id}>"><{$delimg}></a>
                  
                   </td>
                </tr>
            </tbody>

            <{foreachelse}>
            <tr>
                <td class="norecord" colspan="99"><i></i><span>暂无符合条件的数据记录</span></td>
            </tr>
            <{/foreach}>

        </table>
        </form>
        <{/if}>
    </div>
</body>
<script>
function toggle_group(oid, conf) {
	obj = $('#a_'+oid)[0];
	if(!conf) {
		var conf = {'show':'[-]','hide':'[+]'};
	}
	var obody = $('#'+oid)[0];
	if(obody.style.display == 'none') {
		obody.style.display = '';
		obj.innerHTML = conf.show;
	} else {
		obody.style.display = 'none';
		obj.innerHTML = conf.hide;
	}
}
</script>
</html>